import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'
import { AppProvider } from '@/contexts/AppContext'
import Header from '@/components/Header'

const inter = Inter({ 
  subsets: ['latin'],
  variable: '--font-inter'
})

export const metadata: Metadata = {
  title: '箱野 SURPRISE YARD - 一箱未知，十倍惊喜',
  description: '把城市角落里没人认领的包裹重新扔进盲盒机，让每一次开箱都像在荒野里捡到宝。环保循环，惊喜无限。',
}

export default function RootLayout({
  children,
}: {
  children: React.ReactNode
}) {
  return (
    <html lang="zh-CN" className={inter.variable}>
      <head>
        <link rel="icon" href="/favicon.ico" />
      </head>
      <body className="min-h-screen bg-white font-sans antialiased">
        <AppProvider>
          <Header />

          {/* 主要内容 */}
          <main className="flex-1">
            {children}
          </main>

          {/* 简单页脚 */}
          <footer className="bg-gray-800 text-white">
            <div className="max-w-6xl mx-auto px-4 py-12">
              <div className="grid grid-cols-1 lg:grid-cols-3 gap-8">
                {/* 品牌信息 */}
                <div>
                  <div className="flex items-center space-x-2 mb-6">
                    <div className="w-12 h-12 bg-yellow-400 rounded-lg flex items-center justify-center">
                      <span className="text-2xl">📦</span>
                    </div>
                    <div>
                      <h2 className="text-2xl font-bold">箱野</h2>
                      <p className="text-yellow-400 text-sm">SURPRISE YARD</p>
                    </div>
                  </div>
                  
                  <p className="text-gray-300 mb-6">
                    把城市角落里没人认领的包裹重新扔进盲盒机，让每一次开箱都像在荒野里捡到宝。
                    <span className="text-yellow-400 font-medium">一箱未知，十倍惊喜。</span>
                  </p>
                </div>

                {/* 快速链接 */}
                <div>
                  <h3 className="font-semibold text-yellow-400 mb-4">快速链接</h3>
                  <ul className="space-y-3">
                    <li><a href="/shop" className="text-gray-300 hover:text-yellow-400 transition-colors">盲盒商城</a></li>
                    <li><a href="/about" className="text-gray-300 hover:text-yellow-400 transition-colors">关于箱野</a></li>
                    <li><a href="/help" className="text-gray-300 hover:text-yellow-400 transition-colors">帮助中心</a></li>
                    <li><a href="/profile" className="text-gray-300 hover:text-yellow-400 transition-colors">用户中心</a></li>
                  </ul>
                </div>

                {/* 联系信息 */}
                <div>
                  <h3 className="font-semibold text-yellow-400 mb-4">联系我们</h3>
                  <div className="space-y-3 text-sm text-gray-300">
                    <div>客服电话: 15328965713</div>
                    <div>邮箱: 1437594522@qq.com</div>
                    <div>地址: 浙江省杭州市拱墅区创业大街666号</div>
                  </div>
                </div>
              </div>

              {/* 底部版权 */}
              <div className="border-t border-gray-700 mt-12 pt-8 text-center">
                <div className="text-sm text-gray-400">
                  © 2025 箱野 SURPRISE YARD. 保留所有权利.
                </div>
              </div>
            </div>
          </footer>
        </AppProvider>
      </body>
    </html>
  )
}